﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Marbles.Core.Pages;

namespace Marbles.Web.BBS
{
    public partial class Discussion : ForumPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string ForumName = "";
            Int64 postid = 0;

            if (Request.Params["f"] != null) { ForumName = Request.Params["f"].ToString(); }
            if (Request.Params["t"] != null) { if (!Int64.TryParse(Request.Params["t"], out postid)) { postid = 0; } }

            this.cPostList.ForumName = ForumName;
            this.cPostList.PostId = postid;
        }

        protected void cForumPost_PostFinished(object sender, EventArgs e)
        {
            Response.Redirect("Discussion.aspx?f=" + Request.Params["f"] + "&t=" + Request.Params["t"], true);
        }

        protected void cForumPost_PostCancelled(object sender, EventArgs e)
        {
            Response.Redirect("Discussion.aspx?f=" + Request.Params["f"] + "&t=" + Request.Params["t"], true);
        }


    }
}